package com.blb.edupayservice.feign;

import com.blb.common.entity.Course;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@FeignClient("edu-course-service")
public interface CourseServiceFeignClient {

    /**
     * 增加课程销量
     * @param id
     * @return
     */
    @RequestMapping("/course/add-sales/{id}")
    Course addCourseSales(@PathVariable Long id);

    /**
     * 减少课程销量
     * @param id
     * @return
     */
    @RequestMapping("/course/reduce-sales/{id}")
    Course reduceCourseSales(@PathVariable Long id);
}
